<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Advertising_model extends MY_Model 
{
    public $table = 'advertising';
    public $primary = 'id';
    
    public function getAdvertisingByBid($type, $position) 
    {
        $query = $this->db->query("SELECT * FROM  `{$this->table}`
                               WHERE `type` = '{$type}' AND `position` = '{$position}'
                               LIMIT 4");
        return $query->result_array();
    }
}